package com.zhiyou.hospital.ssh.service.impl;

import com.zhiyou.hospital.ssh.dao.IBaseDao;
import com.zhiyou.hospital.ssh.service.IBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by zhouyanchao on 2017/10/17.
 * Descr:
 */
@Service
public class BaseServiceImpl<T> implements IBaseService<T> {

	@Resource(name = "baseDao")
	IBaseDao<T> baseDao;

	@Override
	public boolean updateData(T obj) {
		return baseDao.updateData(obj);
	}

	@Override
	public boolean deleteData(T obj) {
		return baseDao.deleteData(obj);
	}

	@Override
	public T getById(Class<T> clazz,int id) {
		return baseDao.getById(clazz,id);
	}

	@Override
	public boolean addNewData(T obj) {
		return baseDao.addNewData(obj);
	}
}
